import axios from 'axios'

export default class  {
   
    //添加进度款申请信息
    AddLaberSalary(apply,projectId){
        return axios.get(`http://localhost/smj_laber_salary`,{
            params:{
                'p_id':projectId,
                'type':apply.type ,
                'year':apply.year,
                'menth':apply.menth,
                'apply_date':apply.apply_date,
                'handler_id':apply.handler_id,
                'attach_ids':apply.attach_ids,
            }
        })
    }

    //添加工资明细
    AddWorkList(tenderPurchaseDetails,id){
        return axios.get(`http://localhost/smj_laber_salary/AddWorkList`,{
            params:{
                'salary_id':id,
                'name':tenderPurchaseDetails.name ,
                'type':tenderPurchaseDetails.type,
                'day':tenderPurchaseDetails.day,
                'salaryday':tenderPurchaseDetails.salaryday,
                'salary':tenderPurchaseDetails.salary,
                'salaryplus':tenderPurchaseDetails.salaryplus,
                'borrowsalary':tenderPurchaseDetails.borrowsalary,
                'insurancesalary':tenderPurchaseDetails.insurancesalary,
                'deductsalary':tenderPurchaseDetails.deductsalary
            }
        })
    }

    //添加审批
    FlowSalary(apply){
        return axios.post(`http://localhost/smj_laber_salary/FlowSalary`,apply)
    }

    //查询工资列表
    listlabersalary(params){
        return axios.get(`http://localhost/smj_laber_salary/listlabersalary`,{
            params:params
        })
    }

    //查询工资
    getWorkList(id){
        return axios.get(`http://localhost/smj_laber_salary/getWorkList`,{
            params:{
                'id':id
            }
        })
    }

    //查询工资单
    getfromaudit(id){
        return axios.get(`http://localhost/smj_laber_salary/getfromaudit`,{
            params:{
                'id':id
            }
        })
    }



    

}